package com.example.pachong.mapper;

import com.example.pachong.pojo.Discuss;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface DiscussMapper {
    @Select("select * from discuss where iddis = #{iddis} and discusscol = #{discusscol}")
    Discuss selectByUid(Discuss discuss);

    @Insert("insert into discuss(iddis,discusscol,disfreq,time,temp) value(#{iddis},#{discusscol},#{disfreq},#{time},#{temp})")
    void insertUser(Discuss discuss);

    @Update("update discuss set disfreq = #{disfreq},time = #{time},temp = #{temp} where iddis = #{iddis} and discusscol = #{discusscol}")
    void updateUser(Discuss discuss);
}
